﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UcAsp.Net.SMTP;
namespace Kunlun.BusinessLogic
{
    public partial class RegionSendMail
    {
        public static bool Send(string to,string id, string toname,string password,string title)
        {
            try
            {
                SMTP smtp = new SMTP();
                smtp.DNS = new string[] { "8.8.8.8", "8.8.4.4" };
                smtp.From = "service@indehao.com";
                smtp.FromName = "影得好网站注册客服";
                smtp.Subject = title;
                smtp.HtmlBody = WebLog.RegEmail().Replace("$Email$", to).Replace("$Password$", password).Replace("$ID$",id).Replace("$Date$",DateTime.Now.ToShortDateString());
                smtp.To = to;
                smtp.ToName = toname;
              return   smtp.SendMail();
            }
            catch
            {
                return false;
            }
        }
    }
}
